package test;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.bind.annotation.RequestMapping;

import com.gpoint.rdp.base.core.entity.ResultMessage;
import com.gpoint.rdp.base.web.util.RequestUtil;
import com.gpoint.rdp.door.door.persistence.entity.DoorPo;
import com.gpoint.rdp.door.zoneCTL.persistence.entity.DoorControllerPo;
import com.gpoint.rdp.door.zoneCTL.service.DoorControllerService;

public class test {
	
	@Resource
	private DoorControllerService doorControllerService;
	@RequestMapping("save")
	public void save(HttpServletRequest request,HttpServletResponse response) throws Exception{
		ResultMessage message=null;
		try {
			String json = RequestUtil.getString(request, "json");
			doorControllerService.save(json);
			message=new ResultMessage(ResultMessage.SUCCESS, "保存服务商代码成功");
		} catch (Exception e) {
			message=new ResultMessage(ResultMessage.FAIL, "对服务商代码操作失败,"+e.getMessage());
		}
	}
	
	
	
}
